Optimal. Leaf size=120 \[ \frac {2 \sqrt {a} C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a (A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {4171, 4100,
3886, 221} \begin {gather*} \frac {2 a (A+3 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d \sqrt {\sec (c+d x)}}+\frac {2 \sqrt {a} C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 3886
Rule 4100
Rule 4171
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {3}{2}}(c+d x)} \, dx &=\frac {2 A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {2 \int \frac {\sqrt {a+a \sec (c+d x)} \left (\frac {1}{2} a (A+3 B)+\frac {3}{2} a C \sec (c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx}{3 a}\\ &=\frac {2 a (A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+C \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {(2 C) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a (A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.75, size = 94, normalized size = 0.78 \begin {gather*} \frac {\sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))} \left (3 \sqrt {2} C \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )+2 (2 A+3 B+A \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 d \sqrt {\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(209\) vs.
\(2(102)=204\).
time = 0.22, size = 210, normalized size = 1.75
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (3 C \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+3 C \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+4 A \left (\cos ^{2}\left (d x +c \right )\right )+4 A \cos \left (d x +c \right )+12 B \cos \left (d x +c \right )-8 A -12 B \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {3}{2}}}{6 d \sin \left (d x +c \right )}\) | \(210\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 373 vs.
\(2 (102) = 204\).
time = 0.66, size = 373, normalized size = 3.11 \begin {gather*} \frac {\sqrt {2} {\left (3 \, \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) - 3 \, \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 2 \, \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )\right )} A \sqrt {a} + 12 \, \sqrt {2} B \sqrt {a} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C \sqrt {a} {\left (\log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) + \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right )\right )}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.99, size = 358, normalized size = 2.98 \begin {gather*} \left [\frac {3 \, {\left (C \cos \left (d x + c\right ) + C\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {4 \, {\left (A \cos \left (d x + c\right )^{2} + {\left (2 \, A + 3 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{6 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, \frac {3 \, {\left (C \cos \left (d x + c\right ) + C\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right ) + \frac {2 \, {\left (A \cos \left (d x + c\right )^{2} + {\left (2 \, A + 3 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )}{\sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________